SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vw_inforganizaciones
AS
SELECT     o.Nombre AS Expr1, o.CUISE AS Expr2, o.Domicilio AS Expr3, o.Responsable AS Expr4, o.NormaCreacion AS Expr5, o.NormaBaja AS Expr6, 
                      o.CuentaBancaria AS Expr7, o.Dependencia AS Expr8, o.TieneSubOrganizacion AS Expr9, o.Email AS Expr10, o.EsPrivada AS Expr11, 
                      o.FehaAlta AS Expr12, so.Descripcion AS Expr13, l.localidad AS Expr14, zo.zona AS Expr15, me.Descripcion AS Expr16, tipo.Descripcion AS Expr17, 
                      ne.NivelEnsenanza AS Expr18
FROM         dbo.tb_Organizaciones o INNER JOIN
                      dbo.tb_SubOrganizaciones so ON o.idOrganizaciones = so.Org LEFT OUTER JOIN
                      dbo.tb_Localidades l ON l.idLocalidad = o.Localidad LEFT OUTER JOIN
                      dbo.tb_TiposOrganizacion tipo ON tipo.idTipoOrganizacion = o.Tipo LEFT OUTER JOIN
                      dbo.tb_NivelesEnsenanza ne ON ne.idNivelEnsenanza = so.Nivel LEFT OUTER JOIN
                      dbo.tb_ModalidadesEnsenanza me ON me.idModalidad = so.Modalidad LEFT OUTER JOIN
                      dbo.tb_Zonas zo ON zo.idZona = so.Zona
GO
GRANT SELECT ON  [dbo].[vw_inforganizaciones] TO [SoloVer]
GO
